Skip to content

Theory KDTree#14

Open
Half-Head wants to merge 23 commits intoDafeCpp:mainfrom
Half-Head:theory
Open

Theory KDTree#14
Half-Head wants to merge 23 commits intoDafeCpp:mainfrom
Half-Head:theory

Conversation

@Half-Head
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 15 out of 28. Check the log or trigger a new build to see more.

Comment thread task_02/src/stack.hpp
#include <vector>

template <typename T>
concept Comparable = requires(T a, T b) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'T' does not refer to a value [clang-diagnostic-error]

concept Comparable = requires(T a, T b) {
                                   ^
Additional context

task_02/src/stack.hpp:4: declared here

template <typename T>
                   ^

Comment thread task_02/src/stack.hpp

template <typename T>
concept Comparable = requires(T a, T b) {
{ a < b } -> std::convertible_to<bool>;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'T' does not refer to a value [clang-diagnostic-error]

concept Comparable = requires(T a, T b) {
                              ^
Additional context

task_02/src/stack.hpp:4: declared here

template <typename T>
                   ^

Comment thread task_02/src/stack.hpp

template <typename T>
concept Comparable = requires(T a, T b) {
{ a < b } -> std::convertible_to<bool>;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: unknown type name 'concept' [clang-diagnostic-error]

concept Comparable = requires(T a, T b) {
^

Comment thread task_02/src/stack.hpp
};

template <Comparable T>
class Stack {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: unknown type name 'Comparable' [clang-diagnostic-error]

template <Comparable T>
          ^

Comment thread task_02/src/stack.hpp
void Push(int value);
int Pop();
void Push(T k);
T Pop();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: unknown type name 'T' [clang-diagnostic-error]

  void Push(T k);
            ^

Comment thread task_02/src/stack.hpp

template <Comparable T>
T Stack<T>::Pop() {
if (_data.size() == 0) throw std::out_of_range("No data in stack");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: unknown type name 'T' [clang-diagnostic-error]

T Stack<T>::Pop() {
^

Comment thread task_02/src/stack.hpp
T Stack<T>::Pop() {
if (_data.size() == 0) throw std::out_of_range("No data in stack");
T pop_val{_data.back()};
_data.pop_back();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: expected ';' after expression [clang-diagnostic-error]

Suggested change
T pop_val{_data.back()};
T; pop_val{_data.back()};

Comment thread task_02/src/stack.hpp
T Stack<T>::Pop() {
if (_data.size() == 0) throw std::out_of_range("No data in stack");
T pop_val{_data.back()};
_data.pop_back();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: use of undeclared identifier 'pop_val' [clang-diagnostic-error]

  T pop_val{_data.back()};
    ^

Comment thread task_02/src/stack.hpp
T pop_val{_data.back()};
_data.pop_back();
return pop_val;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: use of undeclared identifier 'pop_val' [clang-diagnostic-error]

  return pop_val;
         ^

Comment thread task_02/src/stack.hpp
}

template <Comparable T>
class MinStack {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: unknown type name 'Comparable' [clang-diagnostic-error]

template <Comparable T>
          ^

Comment thread doc/topic2/question1.md

## Принцип работы

Далее будем говорить о множестве точек на плоскости (порядка миллиона), представляющие собой 2 координаты: x и y. Но стоит помнить, что вместо них могут быть как те же треугольники, так и другие объекты, которые могут находиться не только в плоскости, но и в пространстве, 4-х мерном измерении и тд. Принцип работы координально отличаться не будет, но все же некоторые нюансы стоит учитывать.Однако на них в данном конспекте заострять внимание не будем.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"... учитывать.Однако ..." пробела не хватает

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants